from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import (
    RiskIndicatorViewSet,
    RiskAlertViewSet,
    RiskAssessmentResultViewSet,
    RiskLimitViewSet,
    RiskMonitoringTaskViewSet
)

app_name = 'risk_control'

# 创建路由器
router = DefaultRouter()
router.register(r'indicators', RiskIndicatorViewSet, basename='risk-indicator')
router.register(r'alerts', RiskAlertViewSet, basename='risk-alert')
router.register(r'assessments', RiskAssessmentResultViewSet, basename='risk-assessment')
router.register(r'limits', RiskLimitViewSet, basename='risk-limit')
router.register(r'monitoring-tasks', RiskMonitoringTaskViewSet, basename='monitoring-task')

urlpatterns = [
    path('api/', include(router.urls)),
]